import Vue from "vue";
import VueRouter from "vue-router";

const Home = () => import('../pages/home/Home')//首页
const Category = () => import('../pages/category/Category')//分类
const Shopcart = () => import('../pages/shopcart/Shopcart')//购物车
const Ucenter = () => import('../pages/ucenter/Ucenter')//我的


// 要告诉 vue 使用 vueRouters
Vue.use(VueRouter);

const routes = [
    {
        path:'',
        redirect:'/home'
    },
    {
        path:'/home',
        component: Home
    },
    {
        path:'/category',
        component: Category
    },
    {
        path:'/shopcart',
        component: Shopcart
    },
    {
        path:'/ucenter',
        component: Ucenter
    }
]

var router =  new VueRouter({
    routes
})
export default router;